package com.webservice.command.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtil {
	
	/**
	 * 获得当前Date 对象表示的毫秒数
	 * @return
	 */
	public static long getTime() {
		Date date = new Date();
		return date.getTime();
	}
	
	public static String getDateString() {
		Date date = new Date();
		SimpleDateFormat form = new SimpleDateFormat("yyyy-MM-dd");//yyyyMMddHHmmssSSS 
		return form.format(date);
	}
	
	public static String getTimeString() {
		Date date = new Date();
		SimpleDateFormat form = new SimpleDateFormat("yyyyMMddHHmmss");//yyyyMMddHHmmssSSS 
		return form.format(date);
	}
}
